import com.libaiwen.pojo.Books;
import com.libaiwen.service.BookSerive;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Mytest {
    @Test
    public void test(){
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        BookSerive bookServiceImpl = (BookSerive) context.getBean("BookServiceImpl");
        for (Books books: bookServiceImpl.queryAllBook()) {
            System.out.println(books);
        }


    }
}
